package kr.co.shoppingmall.board;

import java.util.HashMap;
import java.util.List;

public class BoardServiceImpl implements BoardService {
	// BoardService 는 BoardDAO 에 의존
	private BoardDAO boardDAO;
	// Setter Injection 으로 의존성을 주입
	public void setBoardDAO(BoardDAO boardDAO) {
		this.boardDAO = boardDAO;
	}

	@Override
	public void insertBoard(BoardDTO dto) {
		boardDAO.insertBoard(dto);
	}

	@Override
	public List getBoardList(HashMap map) {
		return boardDAO.getBoardList(map);
	}

	@Override
	public int getCount() {
		return boardDAO.getCount();
	}

	@Override
	public BoardDTO getBoard(int board_num) {
		return boardDAO.getBoard(board_num);
	}

	@Override
	public void updateHit(int board_num) {
		boardDAO.updateHit(board_num);
	}

	@Override
	public void updateBoard(BoardDTO dto) {
		boardDAO.updateBoard(dto);
	}

	@Override
	public void deleteBoard(BoardDTO dto) {
		boardDAO.deleteBoard(dto);
	}

	@Override
	public void updateReply(BoardDTO dto) {
		boardDAO.updateReply(dto);
	}

	@Override
	public void insertReply(BoardDTO dto) {
		boardDAO.insertReply(dto);
	}

}//end